<%-- 
    Document   : adminventas
    Created on : 15/06/2010, 12:46:43 AM
    Author     : Carlos
--%>

<%@include file="ValidarSession.jsp"%>
<%@page import="java.util.*,masters.modelo.Ventas" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
   <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Documento sin t&iacute;tulo</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<style type="text/css">
<!--
#fondo {
	background-color: #CCCCCC;
	height: 700px;
	width: 950px;
}
#masters {
	background-color: #333333;
	height: 30px;
	width: 200px;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	top: 10cm;
}
.Estilo1 {color: #CCCCCC}
.Estilo2 {color: #CCCCCC; font-family: "kristen ITC"; }
.Estilo3 {
	font-family: "kristen ITC";
	color: #333333;
}
-->
</style>
</head>

<body>
<table width="1024" height="700" border="1" align="center">
  <tr>
    <td align="center" valign="middle" background="imagenes/Columna1.png"><div>
      <div align="center" class="Estilo3"><a href="inicio.html"><img src="imagenes/titulo.png" width="200" height="35" align="absmiddle" /></a></div>
    </div>
        <!-- InstanceBeginEditable name="EditRegion7" -->
        <table width="1024" height="617" border="0">
          <tr>
            <td height="613" align="center" valign="top"><p>&nbsp;</p>
              <p>&nbsp;</p>
              <form id="form1" name="form1" method="post" action="VentasBuscarServlet">
                <table width="829" height="546" border="1">
                  <tr>
                    <td height="23"><div align="center">
                        <p>ADMINISTRACION DE VENTAS</p>
                    </div></td>
                  </tr>
                  <tr>
                    <td height="80">BUSCAR POR ID_VENTA:
                      <label>
                      <input type="text" name="nombre" id="textfield" />
</label>
                      <label> </label>
                      <label> </label>
                      <label> </label>
                      <label> </label>
                      <label> </label>
                      <label> </label>
                      <label> </label>
                      <label> </label>
                      <label>
                      <input type="submit" name="button" id="button" value="BUSCAR" />
                      </label></td>
                    <td width="424"><input type="button" name="button2" id="button2" value="                NUEVA VENTA               " onclick="window.location='ventasNuevo.jsp'"/>
                  </tr>
                  <tr>
                    <td height="23" colspan="2">&nbsp;</td>
                  </tr>
                  <tr>
                    <td colspan="2" align="center" valign="top"><table width="801" height="46" border="1">
                      <tr>
                        <td><div align="center"><strong>Codigo Venta</strong></div></td>
                        <td><div align="center"><strong>Codigo Producto</strong></div></td>
                        <td><div align="center"><strong>Cantidad</strong></div></td>
                        <td><div align="center"><strong>Precio Unidad</strong></div></td>
                        <td><div align="center"><strong>Precio Total</strong></div></td>
                        <td><div align="center"><strong>Accion</strong></div></td>
                      </tr>
                       <%
  	Collection <Ventas> listau= (ArrayList <Ventas>)request.getAttribute("idVentas");
  	if(listau!=null){
  		for(Ventas Ventas:listau){%>

                <tr>
    <td><div align="center"><%= Ventas.getIdventas() %></div></td>
    <td><div align="center"><%= Ventas.getIdproducto() %></div></td>
    <td><div align="center"><%= Ventas.getCantidad() %></div></td>
    <td><div align="center"><%= Ventas.getPrecio_unidad() %></div></td>
    <td><div align="center"><%= Ventas.getPrecio_total() %></div></td>
    <td><a href="VentasVerServlet?idVentas=<%= Ventas.getIdventas() %>">Ver</a> - <a href="VentasEditarServlet?idVentas=<%= Ventas.getIdventas() %>">Editar</a> - <a href="VentasEliminarServlet?idVentas=<%= Ventas.getIdventas() %>">Eliminar</a></td>
      </tr>
      <%
 		}
  	}
%>


                    </table></td>
                  </tr>
                </table>
              </form>            </td>
          </tr>
        </table>
        <p>
          <label>


          <input type="button" name="button3" id="button3" value="REGRESAR" onclick="window.location='principal.jsp'"/>
          </label>
        </p>
        <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="EditRegion3" --><!-- InstanceEndEditable --></td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>

